<?php
	//sometime
	include("../../connect/connect.php");
	$sql = "drop table if exists gis_project;";
	$rs=mysql_query($sql);
    $sql="create table gis_project as 
select b.vill_name,b.tam_name,b.amp_name,b.prov_name,a.*,lat,lng from 
(select prov,amp,tmb,concat(prvidgen,ampidgen,tmbidgen)*100+vill as villno,artisan_fund,monther_fund,relhead_fund,youth_fund,female_fund,sumoffund from gis_project_original a left join plcnmegen b
on a.prov=b.prvidgen and a.amp=b.ampnmegen and a.tmb=b.tmbnmegen) a
left join convert_latlngofsouthprov b on a.villno=b.vill_code where lat is not null and lng is not null";
	$rs=mysql_query($sql);
	//mysql_free_result($rs);
	mysql_close($c);
	echo "<br>complete create gis_project";
?>